@import '~@hi-ui/core-css/lib/index.scss';

$selector-prefix: '#{$component-prefix}-time-picker__selector' !default;
$selector-shortcut-class: '#{$selector-prefix}__shortcut' !default;
$item-class: '#{$selector-prefix}__item' !default;

.#{$selector-prefix} {
  cursor: pointer;
  position: relative;
  z-index: 0;
  width: 54px;
  color: get-color('gray', 600);
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    .#{$selector-shortcut-class} {
      opacity: 1;
    }
  }

  &--position-left {
    .#{$item-class} {
      border-radius: 4px 0 0 4px;
    }

    margin-right: 1px;
  }

  &--position-right {
    .#{$item-class} {
      border-radius: 0 4px 4px 0;
    }

    margin-left: 1px;
  }

  &--position-single {
    .#{$item-class} {
      border-radius: 4px;
    }
  }

  &__item {
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: 14px;

    &:hover {
      background: use-color('gray', 100);
    }

    &#{&}--active {
      color: use-color-mode('primary');
    }

    &#{&}--disabled {
      opacity: 0.2;
      cursor: not-allowed;
      background: transparent;
    }
  }

  &__demarcate {
    margin: 2px 0;
    height: 32px;

    &:first-of-type {
      margin-top: 0;
    }

    &:last-of-type {
      margin-bottom: 0;
    }
  }

  &__scroll-part {
    overflow-y: auto;
    box-sizing: content-box;
    scroll-behavior: smooth;
    scrollbar-width: none; /* firefox */
    -ms-overflow-style: none; /* IE 10+ */
    padding: 100px 0;
    width: 100%;
    position: relative;
    z-index: 0;

    &::-webkit-scrollbar {
      display: none; /* Chrome Safari */
    }
  }

  &__shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 12px;
    opacity: 0;
  }
}
